package org.streets.commons.expression;


/**
 * 求值命令：延迟求值
 * 
 */
public class EvalCommand {
	protected ExpressValueProvider ee;
	private Object express;

	public EvalCommand(Object express, ExpressValueProvider ee) {
		this.ee = ee;
		this.express = express;
	}

	public Object evalValue() {
		if (express instanceof Express) {
			return ((Express) express).eval(ee);
		} else if (express instanceof String) {
			return ee.value((String) express);
		}
		return express;
	}
}
